The present invention relates to a simulation apparatus for numerically simulating physical phenomena, and in particular, to a program generation method suitable for numerically reproducing physical phenomena such as behaviors of atoms, molecules, and ions in a crystal growth and behavior of plasma in a nuclear fusion reactor and to a method of generating input values necessary for execution of programs thus generated.
When describing a physical phenomenon of a many particles system as behaviors of a plurality of particles in a spatial region in a manner similar to that adopted in an analysis at an atom level of a crystal growth, there is used a set of ordinary differential equations representing spatial positions of the plural particles with respect to time. In the equations, according to changes in attributes and environments of particles, the numerical values as well as forms or configurations of the expressions are varied.
Usually, a numerical simulation apparatus for simulating these physical phenomena is implemented by specifying programs to be executed in a general-purpose computer.
Conventionally, the concrete implementing methods of the simulation apparatus include a method in which the programs are described in general-purpose computer language, for example, FORTRAN, a method employing programs available in the software market, and a method as described in JP-A-60-140433 in which according to partial differential equations representing physical phenomena and description of a spatial region for numerical calculations, there are automatically generated in accordance with finite element methods programs to execute numerical calculations for the partial differential equations.
Moreover, when executing a simulation, it is required in some cases to specify parameters of which values are altered during the execution of the simulation. Ordinarily, when specifying parameters having values thus altered, there is adopted a method in which a program is executed each time the value of parameter is changed or a method in which points of time and methods of changing parameter values are specified.
Heretofore, in a case where a numerical simulation apparatus of physical phenomena is materialized such that programs described in the general-purpose computer language, FORTRAN are executed in a general-purpose computer, due to usage of the general-purpose language, there is required for the control of simulation a program containing a large number of statement lines.
To avoid this difficulty, there has been adopted measures in which a software system of a particle simulation package available in the market is executed in a general-purpose computer. However, when using such a software package, equations themselves cannot be inputted in this software and the range of simulation is disadvantageously limited. For example, depending on environmental conditions of simulation such as a constant temperature or pressure, the form of equation varies. The differences in the form of the equations in this case include numerical differences in coefficients, differences in forms of terms appearing in the equations, and differences in the numbers of variables in the differential equations. Consequently, when a new equation is to be introduced to reproduce behaviors of particles under new environmental conditions, the conventional software package cannot appropriately achieve the simulation in some case.
Furthermore, there may possibly be employed a method in which according to partial differential equations representing physical phenomena and description of a spatial region for numerical computations, there are automatically generated in accordance with finite element methods programs to execute numerical computations for the partial differential equations. However, this method is unsuitable for processing behavior of particles. When a finite element method is utilized in a particle simulation, a large amount of areas of main memory and quite a long period of computation time are required. For example, in a numerical simulation of a process of crystal growth for each atom, assume as an example a problem in which behaviors of 1000 atoms are traced for ten pico-seconds at an interval of one femtosecond. Namely, a simultaneous system of second-order differential equations with 3000 unknowns in a field having three-dimensional positions for each atom at each point in a one-dimensional region of time is required to be solved for 10,000 partitioned elements. When using the conventional method in which the differential equations are converted into a simultaneous system of equations of first degree, there is obtained a matrix having 30 million rows. Namely, only the elements of the matrix occupy 4000 tera-bytes of the main memory in the general-purpose computer system. This means that a feasible numerical simulation program cannot be produced. Moreover, in the conventional method, about 3000 equations are required to be described; furthermore, it is impossible to utilize such advantages that each equation is represented in a spatial position characterizing each particle and the equations of the respective particles can be described in the same format. Consequently, more than necessary information items are duplicatedly described and the program description becomes to be considerably complicated.